<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>

<div id="app">
 <cpn></cpn>
</div>

<template>
  <div>我是组件</div>
</template>


<template id="cpn">
  <div>
    <h1>当前计数:{{counter}}</h1>
  </div>
</template>

<script src="../js/vue%20.js"></script>
<script>

  //注册一个全局组件
  Vue.component('cpn',{
    template: '#cpn',
    data() {
      return {
        title: 'abc'
      }
    }
  })

  const app = new Vue({
    el:'#app',
    data:{
      message:'hello',
      movies:['火影忍者','海贼王']
    },
  })
</script>
</body>
</html>